package com.jtlrm.ckd.mvp.view.adapter;

import android.widget.CheckBox;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jtlrm.ckd.R;
import com.jtlrm.ckd.entity.BanSuiEntity;

public class BanSuiBingAdapter extends BaseQuickAdapter<BanSuiEntity, BaseViewHolder> {

    public BanSuiBingAdapter() {
        super(R.layout.ban_sui_bing_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, BanSuiEntity item) {
        if (item.isChecked()) {
            ((CheckBox) helper.getView(R.id.checkbox)).setChecked(true);
        } else {
            ((CheckBox) helper.getView(R.id.checkbox)).setChecked(false);
        }
        helper.setText(R.id.name, item.getName());
    }
}
